<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <link rel="stylesheet" th:href="@{/diaShop/css/common.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/diaShop/css/style.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/diaShop/fonts/iconfont.css}" type="text/css"/>
    <script th:src="@{/diaShop/js/jquery-1.9.1.min.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/jquery.SuperSlide.2.1.1.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/common_js.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/footer.js}" type="text/javascript"></script>
    <script th:src="@{/diaShop/js/lrtk.js}" type="text/javascript"></script>
    <title>用户中心</title>
</head>
<script type="text/javascript">
    $(document).ready(function () {

        setInterval(showTime, 1000);
        function timer(obj, txt) {
            obj.text(txt);
        }

        function showTime() {
            var today = new Date();
            var weekday = new Array(7)
            weekday[0] = "星期日"
            weekday[1] = "星期一"
            weekday[2] = "星期二"
            weekday[3] = "星期三"
            weekday[4] = "星期四"
            weekday[5] = "星期五"
            weekday[6] = "星期六"
            var y = today.getFullYear() + "年";
            var month = today.getMonth() + 1 + "月";
            var td = today.getDate();
            var d = weekday[today.getDay()];
            var h = today.getHours();
            var m = today.getMinutes();
            var s = today.getSeconds();
            timer($("#y"), y + month);
            //timer($("#MH"),month);
            timer($("h1"), td);
            timer($("#D"), d);
            timer($("#H"), h);
            timer($("#M"), m);
            timer($("#S"), s);
        }
    })



</script>
<body>
<!--顶部图层-->
<div th:replace="diaShop/layout/mallHeader"></div>

<!--用户中心样式-->
<div class="user_style clearfix">
    <div class="user_center clearfix">
        <!--左侧菜单图层-->
        <div class="left_style">
            <div class="menu_style">
                <div class="user_title">用户中心</div>
                <div class="user_Head">
                    <div class="user_portrait">
                        <a class="btn_link" href="#" title="修改头像"></a> <img src="/diaShop/images/people.png"
                                                                            th:src="@{${user.img}}">
                        <div class="background_img"></div>
                    </div>
                    <div class="user_name">
                        <p><span class="name" th:text="${user.username}">化海天堂</span><a href="#">[修改密码]</a></p>
                        <p th:text="'访问时间'+${user.gmtModified}">访问时间：2016-1-21 10:23</p>
                    </div>
                </div>
                <!--菜单列表图层-->
                <dl class="accountSideOption1">
                    <dt class="transaction_manage"><em class="icon_1"></em>订单中心</dt>
                    <dd>
                        <ul>
                            <li><a th:href="@{'/person/diaShop/order'}">我的订单</a></li>
                            <li><a href="#" onclick="bna1('address',this)">收货地址</a></li>
                            <li><a href="#" onclick="bna1('coupon',this)">我的优惠卷</a></li>

                        </ul>
                    </dd>
                </dl>
                <dl class="accountSideOption1">
                    <dt class="transaction_manage"><em class="icon_2"></em>会员中心</dt>
                    <dd>
                        <ul>
                            <li><a th:href="@{'/person/diaShop/order'}">我的订单</a></li>
                            <li><a href="#" onclick="bna1('collect',this)">我的收藏</a></li>
                            <li><a href="#" onclick="bna1('reply',this)">我的评论</a></li>

                        </ul>
                    </dd>
                </dl>
                <dl class="accountSideOption1">
                    <dt class="transaction_manage"><em class="icon_3"></em>账户中心</dt>
                    <dd>
                        <ul>
                            <li><a href="user.php?act=bonus">我的红包</a></li>
                            <!--<a href="user.php?act=group_buy">我的团购</a>-->
                            <li><a href="user.php?act=track_packages"> 跟踪包裹</a></li>
                            <li><a href="user.php?act=account_log"> 资金管理</a></li>
                        </ul>
                    </dd>
                </dl>

            </div>
        </div>
        <!--右侧内容图层-->
        <div class="right_style" id="listAll">
            <div class="r_user_style">
                <div class="Notice"><i class="icon_Notice"></i><span>系统最新公告:</span>为了更好地服务于【每日鲜】的会员朋友及读者 发表意见。</div>
                <!--账户信息图层样式-->
                <div class="Account_info">
                    <div class="u_date">
                        <h4 class="years" id="y"></h4>
                        <h1></h1>
                        <h4 id="D"></h4>
                    </div>
                    <div class="user_name_info">
                        <ul>
                            <!--<li class="us_one">
                             <div class="name left">用户名:<b>胡海天堂</b>,  欢迎你 <a href="#" class="link_user">[修改密码]</a>  </div>
                             <div class="right time"> <span>上次访问时间：2015-5-21 10:23</span></div>
                           </li>-->
                            <li class="us_two">
                                <dl>
                                    <dt class="left">余额：</dt>
                                    <dd><b th:text="'￥'+${user.balance}">0</b>元</dd>
                                </dl>
                                <dl>
                                    <dt class="left">积分：</dt>
                                    <dd><b th:text="${user.jifen}">2355</b>分 &nbsp;<a class="link_user"
                                                                                      href="#">[积分兑换]</a></dd>
                                </dl>
                                <dl>
                                    <dt class="left"></dt>
                                    <dd><b></b></dd>
                                </dl>
                            </li>
                            <li class="us_Order">
                                <dl>
                                    <dt class="left">未完成：</dt>
                                    <dd><a href="#">无</a></dd>
                                </dl>
                                <dl>
                                    <dt class="left">已完成：</dt>
                                    <dd><a href="#">2</a><a class="Address" href="#">[收货地址管理]</a></dd>
                                </dl>
                            </li>
                            <li class="us_grade">
                                <dl>
                                    <dt class="left">等级：</dt>
                                    <dd><b class="">普通会员</b><a href="#">[查看会员等级规则]</a></dd>
                                </dl>
                            </li>
                        </ul>
                    </div>
                </div>
                <!--订单信息样式-->
                <div class="user_info_p_s clearfix">
                    <div class="left_user_cont">
                        <div class="us_Orders left clearfix">
                            <div class="Orders_name">
                                <div class="title_name">
                                    <div class="Records">积分商品</div>
                                    <div class="right select">
                                        最近兑换的积分商品记录
                                    </div>
                                </div>
                            </div>
                            <table>
                                <thead>
                                <tr>
                                    <th>产品名称</th>
                                    <th>积分</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="uj:${ujList}">
                                    <td class="img_link">
                                        <a class="img" th:href="@{'/diaShop/jfDetail/'+${uj.goodsid}}">
                                            <img height="80" th:src="@{${uj.img}}" width="80"></a>
                                        <a class="title" th:href="@{'/diaShop/jfDetail/'+${uj.goodsid}}"
                                           th:text="${uj.goodsname}">雅诗兰黛（Estee Lauder）
                                            淡化细纹）</a>
                                    </td>
                                    <td th:text="${uj.price}+'积分'">2</td>
                                    <td>完成</td>
                                    <td><a href="#">查看</a></td>
                                </tr>

                                </tbody>
                            </table>
                            <div class="us_jls">记录</div>
                        </div>
                    </div>
                    <!--右侧记录样式-->
                    <div class="right_user_recording">
                        <div class="us_Record">
                            <div class="Record_p" id="Record_p">
                                <div class="title_name">
                                    <span class="name left">浏览历史</span>
                                    <span class="pageState right"><span>1</span><span
                                            th:text="${viewCount}"></span></span></div>
                                <div class="hd">
                                    <a class="next">&lt;</a>
                                    <a class="prev">&gt;</a>
                                </div>
                                <div class="bd">
                                    <ul>
                                        <li th:each="viewGoods,starStat:${viewGoodslist}"
                                            th:unless="${#lists.isEmpty(viewGoodslist)}">
                                            <div class="p_width">
                                                <div class="pic"><a
                                                        th:href="@{'/diaShop/goodsDetail/'+${viewGoods.id}}">
                                                    <img th:src="@{${viewGoods.img}}"></a></div>
                                                <div class="title"><a
                                                        th:href="@{'/diaShop/goodsDetail/'+${viewGoods.id}}"
                                                        th:text="${viewGoods.title}">金龙鱼 东北大米 蟹稻共生 盘锦大米5KG</a></div>
                                                <div class="Purchase_info"><span class="p_Price"
                                                                                 th:text="'￥'+${viewGoods.prices}">￥32.50</span>
                                                    <a class="Purchase" href="#" th:onclick="'addCart('+${com.id}+')'">立即购买</a>
                                                </div>
                                            </div>
                                        </li>

                                    </ul>
                                </div>
                            </div>

                        </div>
                        <script type="text/javascript">jQuery("#Record_p").slide({
                            mainCell: ".bd ul",
                            effect: "leftLoop",
                            vis: 1,
                            autoPlay: false
                        });


                        </script>
                    </div>
                </div>
                <!--收藏商品-->
                <div class="Collections_p">
                    <div class="title_name">收藏的商品</div>
                    <div class="Collect_Products" id="Collect_Product">
                        <div class="hd">
                            <a class="next">&lt;</a>
                            <a class="prev">&gt;</a>
                        </div>
                        <div class="bd">
                            <ul>
                                <li th:each="com:${collectList}">
                                    <div class="pic"><a th:href="@{'/diaShop/goodsDetail/'+${com.id}}">
                                        <img th:src="@{${com.img}}"></a></div>
                                    <div class="title"><a th:href="@{'/diaShop/goodsDetail/'+${com.id}}"
                                                          th:text="${com.title}"/></div>
                                    <div class="p_Price" th:text="'￥'+${com.prices}">￥32.50</div>
                                </li>

                            </ul>
                        </div>
                    </div>

                    <script type="text/javascript">
                        jQuery("#Collect_Product").slide({
                        mainCell: ".bd ul",
                        effect: "leftLoop",
                        vis: 5,
                        autoPlay: false
                    });

                        //精品、最新、全部课程
                        function bna1(type,obj) {
                            var _timer = null;
                            $(obj).addClass('banner_hover').siblings().removeClass('banner_hover');
                            $.ajax({
                                url :"/person/diaShop/ajax-my",
                                data : {
                                    "status" : type
                                },
                                type : 'post',
                                dataType : 'text',
                                beforeSend:function(){
                                    clearTimeout(_timer);

                                },
                                success : function(result) {
                                    _timer = setTimeout(function(){
                                        $("#listAll").html(result);
                                    }, 300);
                                }
                            });
                        }

                        function addCart(goodsid){
                            var count=1;
                            $.ajax({
                                type: "post",
                                url: '/person/diaShop/addCart',
                                data: {
                                    goodsid:goodsid,
                                    count:count},
                                dataType: "json",
                                success:function(data) {
                                    if(data.code==0){
                                        window.location.href = "/person/diaShop/likBuy/"+goodsid;
                                    }else if(data.success=='login'){
                                        window.location.href = "/diaShop/login"
                                    }
                                }
                            });
                        }



                    </script>
                </div>
                <!--结束-->
            </div>
        </div>
    </div>
</div>
<div th:replace="diaShop/layout/mallFooter"></div>
</body>
</html>
